<?php

//$d = 10000/100;
//echo $d;exit;
echo phpinfo();
die();
//$img_url = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQHd8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyWHBmamwyX09ibFAxMDAwME0wMzQAAgQiLstaAwQAAAAA";
//$result =  file_get_contents($img_url);
//file_put_contents('/test.txt',$result);

$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_URL, $img_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$file_content = curl_exec($ch);
curl_close($ch);

//保存文件路径
$dir =  '/image';
if (!is_dir($dir)) {
    mkdir($dir, 0755, true);
}

$downloaded_file = fopen($dir, 'w');
file_put_contents($dir,$file_content);
//fwrite($downloaded_file, $file_content);
//fclose($downloaded_file);
?>